<script setup>
defineEmits(['login-click'])
</script>

<template>
  <div class="navigation-bar">
    <div class="login-container" @click="$emit('login-click')">
      <svg class="login-icon" viewBox="0 0 24 24">
        <path fill="currentColor" d="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z"/>
      </svg>
      <span class="login-text">登录</span>
    </div>
  </div>
</template>

<style scoped>
.navigation-bar {
  width: 100%;
  height: 36px;
  background-color: #002060;
  position: relative;
}

.login-container {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-container:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
}

.login-icon {
  width: 18px;
  height: 18px;
  color: white;
}

.login-text {
  color: white;
  font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
  font-size: 14px;
  user-select: none;
}
</style>